home *** CD-ROM | disk | FTP | other *** search
- -- Shared Cast macros for entire CD
-
- --hilite macro
- macro pressOn
- puppetSound 0
- set whichSprite = the clickOn
- puppetSPRITE whichSprite,true
- global lastClickOn
- set lastClickOn = whichSprite
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) + 4
- PUPPETSOUND "clickSound"
- updateStage
- repeat while the stillDown
- if rollOver(whichSprite) then
- else
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
- --set the locV of sprite 4 to 500
- PUPPETSOUND "clickSound"
- updateStage
- puppetSPRITE whichSprite,false
- updateStage --force button rebound before playOrGo call
- exit
- end if
- end repeat
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
- --set the locV of sprite 4 to 500
- PUPPETSOUND "clickSound"
- puppetSPRITE whichSprite,false
- updateStage
- updateStage --force button rebound before playOrGo call with extra update
- --score script takes over here
- end pressOn
-
-
- macro PaintOn
- puppetSound 0
- set whichSprite = the clickOn
- global hiliteSprite,lastClickOn
- set lastClickOn = whichSprite
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) + 4
- set the locV of sprite hiliteSprite to (the locV of sprite whichSprite +6)
- set the locH of sprite hiliteSprite to the locH of sprite whichSprite
- PUPPETSOUND "clickSound"
- updateStage
- repeat while the stillDown
- if rollover(whichSprite)=false then
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
- set the locV of sprite hiliteSprite to 700
- PUPPETSOUND "clickSound"
- updateStage
- updateStage --force button rebound before playOrGo call
- exit
- end if
- end repeat
- set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
- set the locV of sprite hiliteSprite to 700
- PUPPETSOUND "clickSound"
- updateStage
- updateStage --force button rebound before playOrGo call
- --score script takes over here
- end if
-
- --groupSelect macro
- macro GroupSelect whichSprite
- global lastClickOn
- set lastClickOn = clickOn()
- if rollOver(whichSprite) then
- set the locV of sprite (whichSprite + 1) to the locV of sprite whichSprite
- PUPPETSOUND "clickSound"
- updateStage
- repeat while the stillDown
- if rollOver(whichSprite + 1) then
- else
- set the locV of sprite (whichSprite + 1) to 600
- PUPPETSOUND "clickSound"
- updateStage
- exit
- end if
- end repeat
- end if
-
-
- --mainMenu macro
- macro MainCat whichSprite, theMoovSelect
- PUPPETSOUND "clickSound"
- repeat while the stillDown
- if rollOver(whichSprite) then
- go frame the frame
- else
- go frame theMoovSelect
- end if
- end repeat
-
- -- time delay utility
- macro waitFor seconds
- set now = the timer
- repeat while the timer < (now + (seconds * 60))
- if the mousedown then exit
- end repeat
-
-
- --used by Baseball to hold playback head for wav file to finish
- macro runhalt
- mci "status Phil mode"
- if the result = "playing" then
- go frame the frame --keep checking until ok
- else
- go frame the frame + 1
- preLoad marker (1) --preload cast for next segment before
- end if --playing wav to avoid disk interrupts
-
-
- --
- macro waitFordep seconds
- set now = the timer
- repeat while the timer < (now + (seconds * 60))
- nothing
- end repeat
- --
- macro tmwaitFor seconds
- set now = the timer
- repeat while the timer < (now + (seconds * 60))
- if the mousedown then exit
- end repeat
-
-
- -- sound delay
- macro tmwaitSound thisone
- repeat while soundbusy(1)
- updatestage
- if the mousedown then exit
- end repeat
-
-
- -- sound delay
- --macro waitSound thisone
- -- repeat while soundbusy(1)
- -- updatestage
- -- if the mousedown then exit
- -- end repeat
-
- --
- macro waitSound thisone
- updatestage
- if soundbusy(1) = FALSE then go to the frame +1
- else go to the frame
-
- -- utility
- macro upperCase s
- set r = EMPTY
- set len = length( s )
- repeat with i = 1 to len
- set c = chars( s, i, i )
- if charToNum( c ) >= 97 AND charToNum( c ) <= 122 then Â
- set c = numToChar( charToNum( c ) - 32 )
- set r = r & c
- end repeat
- return r
-
-
-
- --macro for overview buttons in sub menus
- macro playAll playListLine
- global fromMoov,fromType,playAllList,playAllCounter,fromFrame
- global lastClickOn
- if fromType = "playLoop" then
- nothing
- else
- if lastClickOn <> clickOn() then exit
- end if
- set fromFrame=the frame
- set fromType = "playAll"
- set playAllList = line playListLine of field "playList"
- set playAllCounter = 1
- set movieName = item 1 of playAllList
- if machineType() =256 then set movieName=movieName&".mmm"
- go movie movieName -- get ball rolling, and goPlayAll handles list of movies to show
- exit
-
- --macro to control goBack for playAll movies
- macro goPlayAll
- global fromType,playAllList,playAllCounter,fromFrame,mainPath,loopCounter
- set movieName="main"
- if fromType = "playAll" then
- if (playAllCounter + 1) > the number of items in playAllList then --are we done with all items?
- go frame fromFrame of movie mainPath&movieName --if so, go back to main menu
- else
- set movieName =item (playAllCounter + 1) of playAllList --if still items left, then go next movie in list
- if the machineType = 256 then set movieName=movieName&".mmm"
- set playAllCounter=playAllCounter + 1
- go movie movieName
- end if
- --else if fromType = "playLoop" then
- --if line (loopCounter + 10) of field "playList" = "EOF" then set loopCounter = 1 --check for end of list & reset
- --set movieName = line (loopCounter + 10) of field "playList" -- load next movie from list
- --if the machineType = 256 then set movieName=movieName&".mmm"
- --set loopCounter=loopCounter + 1
- --go movie movieName
- else
- nothing
- end if
-
-
- --alternate macro for the following complicated pile...does not address multiple directories
- macro playOrGo movieName,frameName,moovMode
-
- global fromMoov, fromFrame,fromType,mainPath,lastClickOn
- if lastClickOn <> clickOn() then exit
- set demoPath=pathname()&movieName&":"
- if the machineType = 256 then set movieName=movieName&".mmm"
- set fromType = moovMode
- if moovMode = "play" then
- if frameName = "" then
- if movieName = "" then
- nothing
- else
- play movie movieName
- exit
- end if
- else
- play frame frameName of movie movieName
- end if
- --else if moovMode = "playloop" then --called from movie timeoutscript "backtoLoop"
- --set fromFrame = the frame
- --go movie movieName
- --exit
- else if moovMode = "full" then
- set fromFrame = the frame
- if movieName = "" then
- nothing
- else
- go movie demoPath&movieName
- exit
- end if
- else if moovMode = "exit" then
- if movieName = "" then
- nothing
- else
- go movie mainPath&movieName
- exit
- end if
- else
- if frameName = "" then
- if movieName = "" then
- nothing
- else
- go movie movieName
- exit
- end if
- else
- go frame frameName of movie movieName
- end if
- end if
-
- --macro for easy return from playOrGo
- macro goBack
- global fromType,fromFrame,mainPath
- set movieName="main"
- if the machineType = 256 then set movieName=movieName&".mmm"
- waitFor 2
- if fromType = "play" then
- play done
- set the timeoutscript to "backToLoop"
- exit
- else if fromType = "playAll" then
- if clickOn()>22 then
- go frame fromFrame of movie mainPath&movieName --standard "go" bail to main menu
- set the timeoutscript to "backToLoop"
- exit
- else
- go frame the frame + 2 --skip over any one moment please frames
- exit
- end if
- exit
- else
- go frame fromFrame of movie mainPath&movieName --standard "go" bail to main menu
- set the timeoutscript to "backToLoop"
- exit
- end if
-
- --
- macro notYet feature
- alert feature && "not implemented yet."
-
- --
- macro dospath drive, path
- set newpath = ""
- set count = 1
- set newpath = newpath&drive&":"
- repeat while count <= the number of chars in path
-
- if char count of path = ":" then
- set newpath = newpath & "\"
- else
- set newpath = newpath & char count of path
- end if
- set count = count +1
- end repeat
- return newpath
- end dospath
-
- --macro for determining whether we are in a pauseMode or not via "Alt-Shift"
- macro evalPauseState
- global theCurPalette,myTMdll
- if machineType()=256 then
- if line 1 of myTMdll(mGetTaskList)<>"MSHOME" then
- puppetSound 0
- repeat while line 1 of mYTMdll(mGetTaskList)<>"MSHOME"
- go frame the frame
- end repeat
- puppetPalette theCurPalette
- puppetPalette 0
- else
- puppetSound 0
- beep
- end if
- end if
-
-